package day18.zhiyou300;

public class Demo01 implements Runnable {
    static int count = 1;
    @Override
    public void run(){
        int ss = count;
        System.out.print("分线程" + count++ + "：");
        for (int i = 0; i < 2000; i++) {
            System.out.print("线程" + ss + ":" + i + " ");
        }
    }
}

class Test {
    public static void main(String[] args) throws Exception{
        Thread thread = new Thread(new Demo01());
        thread.start();
        thread.join(1000);// 0.01
        for (int i = 0; i < 300; i++) {
            System.out.println(Thread.currentThread().getName()+"-----" + i);
        }
    }
}
